<?php

FLEA::loadClass('FLEA_Com_RBAC_UsersManager');

class Table_Users extends FLEA_Com_RBAC_UsersManager {
    var $tableName = 'users';
    var $primaryKey = 'user_id';
    //var $encodeMethod = PWD_CLEARTEXT;	//现在密码加密用的是默认的算法
    var $encodeMethod = PWD_MD5;

    var $manyToMany = array(
        'tableClass' => 'Table_Roles',
        'mappingName' => 'roles',
        'joinTable' => 'roles_users',
    );
	
	var $hasOne = array(
		//简历��j�û�����
		array(
			'tableClass' => 'Table_UsersProfile',
			'foreignKey'=>'user_id',
			'mappingName' => 'profile',
			'enabled' => true
		),
		//员工��jԱ����
		array(
			'tableClass' => 'Table_Worker',
			'foreignKey'=>'user_id',
			'mappingName'=>'work',
			'enabled' => false
		),
		//教员���Ա���j
		array(
			'tableClass' => 'Table_Teacher',
			'foreignKey'=>'user_id',
			'mappingName'=>'teacher',
			'enabled' => false
		)
	);
}

?>